-
Notifications
You must be signed in to change notification settings - Fork 14k
refactor mingw-w64 self-contained detection #149178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@bors try jobs=dist-x86_64-windows-gnu |
This comment has been minimized.
This comment has been minimized.
refactor mingw-w64 self-contained detection try-job: dist-x86_64-windows-gnu
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
@bors try jobs=dist-x86_64-mingw |
refactor mingw-w64 self-contained detection try-job: dist-x86_64-mingw
This comment has been minimized.
This comment has been minimized.
@petrochenkov |
How does it happen? |
|
Ah, there is a massive hole in my thinking. "works" is a bit of an overstatement. It produces no error, but doesn't result in a callable binary either. As it turns out, this PR has nothing to do with it. The same thing happens on Linux, so this is "fine". Regarding this PR, assuming we want to move decoupling mingw self-contained mode detection forward, do we want to keep |
|
I've just noticed that my initial assumption in #147536 (comment) was incorrect, because the linker is not just compared with "rust-lld", but also searched in So maybe just keep things as is? For further simplification the
|
There was no cyclic dependency there at any point, but it might have looked as such in the previous PR (before reverting changes). The problem I'm dealing with is Guess we can leave this problem for the future. |
Split out from #147536 (comment)
This change decouples
detect_self_contained_mingw()from the linker determined bylinker_and_flavor(), allowing for better control over the process.There should only one user observable change from this PR. Passing
-Clinker=<linker>when is absent from PATH, will result in an error regarding inability to find<linker>, unless-Clink-self-containedis also provided.Previously,
-Clinker=<linker>allowed to call any executable shipped with Rust, includingrust-objcopy,wasm-component-ld.r? @petrochenkov